Integrand size = 23, antiderivative size = 104 \[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=-\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\operatorname {EllipticF}\left (\frac {1}{2} (c+\pi +d x),\frac {8}{7}\right )}{\sqrt {7} d}-\frac {4 \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+\pi +d x),\frac {8}{7}\right )}{3 \sqrt {7} d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2881, 3139, 2733, 3081, 2741, 2885} \[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\frac {\operatorname {EllipticF}\left (\frac {1}{2} (c+d x+\pi ),\frac {8}{7}\right )}{\sqrt {7} d}-\frac {\sqrt {7} E\left (\frac {1}{2} (c+d x+\pi )|\frac {8}{7}\right )}{3 d}-\frac {4 \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x+\pi ),\frac {8}{7}\right )}{3 \sqrt {7} d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d} \]
[In]
[Out]
Rule 2733
Rule 2741
Rule 2881
Rule 2885
Rule 3081
Rule 3139
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {1}{3} \int \frac {\left (2+2 \cos ^2(c+d x)\right ) \sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx \\ & = \frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {1}{12} \int \frac {(8+6 \cos (c+d x)) \sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx-\frac {1}{6} \int \sqrt {3-4 \cos (c+d x)} \, dx \\ & = -\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d}+\frac {1}{2} \int \frac {1}{\sqrt {3-4 \cos (c+d x)}} \, dx+\frac {2}{3} \int \frac {\sec (c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx \\ & = -\frac {\sqrt {7} E\left (\frac {1}{2} (c+\pi +d x)|\frac {8}{7}\right )}{3 d}+\frac {\operatorname {EllipticF}\left (\frac {1}{2} (c+\pi +d x),\frac {8}{7}\right )}{\sqrt {7} d}-\frac {4 \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+\pi +d x),\frac {8}{7}\right )}{3 \sqrt {7} d}+\frac {\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 1.03 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.72 \[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\frac {\frac {6 \sqrt {-3+4 \cos (c+d x)} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),8\right )}{\sqrt {3-4 \cos (c+d x)}}-\frac {i \left (21 E\left (i \text {arcsinh}\left (\sqrt {3-4 \cos (c+d x)}\right )|-\frac {1}{7}\right )-12 \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {3-4 \cos (c+d x)}\right ),-\frac {1}{7}\right )-8 \operatorname {EllipticPi}\left (-\frac {1}{3},i \text {arcsinh}\left (\sqrt {3-4 \cos (c+d x)}\right ),-\frac {1}{7}\right )\right ) \sin (c+d x)}{3 \sqrt {7} \sqrt {\sin ^2(c+d x)}}+\sqrt {3-4 \cos (c+d x)} \tan (c+d x)}{3 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(350\) vs. \(2(166)=332\).
Time = 2.89 (sec) , antiderivative size = 351, normalized size of antiderivative = 3.38
method | result | size |
default | \(-\frac {\sqrt {-\left (8 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-\frac {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{3 \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )}+\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 \sqrt {14}}{7}\right )}{7 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}-\frac {\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \frac {2 \sqrt {14}}{7}\right )}{3 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}-\frac {4 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {56 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7}\, \Pi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \frac {2 \sqrt {14}}{7}\right )}{21 \sqrt {8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}\right )}{\sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-8 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+7}\, d}\) | \(351\) |
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\int { \frac {\sec \left (d x + c\right )^{2}}{\sqrt {-4 \, \cos \left (d x + c\right ) + 3}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\int \frac {\sec ^{2}{\left (c + d x \right )}}{\sqrt {3 - 4 \cos {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\int { \frac {\sec \left (d x + c\right )^{2}}{\sqrt {-4 \, \cos \left (d x + c\right ) + 3}} \,d x } \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\int { \frac {\sec \left (d x + c\right )^{2}}{\sqrt {-4 \, \cos \left (d x + c\right ) + 3}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sec ^2(c+d x)}{\sqrt {3-4 \cos (c+d x)}} \, dx=\int \frac {1}{{\cos \left (c+d\,x\right )}^2\,\sqrt {3-4\,\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]